/*
 * This file is part of gorilla-repl. Copyright (C) 2014-, Jony Hudson.
 *
 * gorilla-repl is licenced to you under the MIT licence. See the file LICENCE.txt for full details.
 */

/* CSS for the Gorilla user interface. Anything required to display the worksheet itself is in worksheet.css */

div.status {
    font-family: 'Arvo', serif;
    font-size: 16px;
    position: fixed;
    /* There seems to be a bug in Safari with rendering text in fixed elements. */
    -webkit-font-smoothing: subpixel-antialiased;
    top: 8px;
    left: 50%;
    width: 600px;
    margin-left: -300px;
    padding: 10px;
    text-align: center;
    border: 1px solid #4682b4;
    background-color: #eeeeee;
    z-index: 100;
}

div.status h3 {
    padding: 0;
    margin: 0;
}


div.free-markup div.CodeMirror {
    font-size: 14px;
    padding: 0.5em;
}


div.selected {
    outline-style: solid;
    outline-width: 1px;
    outline-color: #FF29D2;
}


:focus {
    outline: none;
}

div.menu-icon {
    position: fixed;
    z-index: 100;
    top: 10px;
    right: 20px;
    font-size: 30px;
    opacity: 0.2;
    cursor: default;
}

div.menu-icon:hover {
    opacity: 0.5;
}

div.modal {
    position: fixed;
    /* There seems to be a bug in Safari with rendering text in fixed elements. */
    -webkit-font-smoothing: subpixel-antialiased;
    z-index: 999;
    top: 8px;
    left: 50%;
    width: 600px;
    margin-left: -300px;
    background-color: #cccccc;
    padding: 7px;
    /*border: 1px solid #4682b4;*/
    font-family: 'Arvo', serif;
    font-size: 16px
}

div.modal h3 {
    padding: 0;
    margin: 0;
}

div.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    opacity: 0.8;
    z-index: 998;
}

div.modal-content {
    padding: 3px;
    font-family: 'Lucida Grande', sans-serif;
}

div.modal-content input {
    width: 580px;
    resize: none;
    border: none;
    padding: 7px;
    margin-bottom: 10px;
    font-family: 'Arvo', serif;
    font-size: 18px;
}


div.palette-items {
    overflow-y: auto;
    max-height: 300px;
    background: #f5f5f5;
}


div.palette-items ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

div.palette-item {
    padding: 10px;
    border-bottom: 1px solid white;
}

div.palette-item.highlight {
    background: #FF29D2;
}

div.command-shortcut {
    padding-top: 5px;
    font-family: 'lucida console', sans-serif;
    font-size: 11px;
    color: #555555;
}

div.modal-button {
    width: 150px;
    padding: 8px 10px 8px 10px;
    margin-right: 10px;
    color: white;
    background: #4682b4;
    font-weight: bold;
    font-family: 'Arvo', serif;
    float: left;
}

div.modal-button.highlight {
    background: #FF29D2;
}

div.doc-viewer {
    position: fixed;
    /* There seems to be a bug in Safari with rendering text in fixed elements. */
    -webkit-font-smoothing: subpixel-antialiased;
    z-index: 999;
    top: 8px;
    right: 8px;
    width: 500px;
    background-color: #eeeeee;
    padding: 3px 7px 3px 7px;
    font-family: monospace;
    font-size: 12px;
    border: 1px solid #aaaaaa;
}

div.doc-viewer-content {
    overflow-y: auto;
    max-height: 300px;
}


/* Hack for FF as it puts the outline around the box-shadow :-( */
@-moz-document url-prefix() {
    .live {outline-offset: -15px}
}

div.running {
    background-color: #d9ffd9;
}

div.last-chance {
    width: 100%;
}

textarea.last-chance {
    width: 100%;
    border: none;
    height: 80px;
    resize: none;
    margin: 10px 0 5px 0;
    padding: 0;
}

.scroll-pad {
    padding-bottom: 200px;
}


.CodeMirror {
    height: auto;
    background: none;
}

.CodeMirror-scroll {
    height: auto;
    overflow-y: hidden;
    overflow-x: auto;
    width: 100%
}

/* Override CM matching bracket style to be more visible */
div.CodeMirror span.CodeMirror-matchingbracket {
    color: #1887F1;
    border-bottom: 1px solid;
    font-weight: bold;
}

@media print {

    .menu-icon {
        display:none;
    }

    div.selected {
        outline: none;
    }

    div.segment {
        page-break-inside: avoid;
    }

}